package io.renren.runner;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import io.renren.htby.utils.KafkaConsumeUtils;
import io.renren.kafka.consume.HeartbeatConsumer;

/**
 * 心跳 监控 的消费者
 * @author lfy.xys
 * @date 2018年6月1日
 *
 */
//@Component
public class HearbeatConsumerRunner implements CommandLineRunner {

	private static Logger logger = LoggerFactory.getLogger(HearbeatConsumerRunner.class);

	public void run(String... var1) throws Exception {
		logger.info("This will be execute when the project was started!");

		HeartbeatConsumer consumer = new HeartbeatConsumer();
		consumer.consume(KafkaConsumeUtils.hearbeat_topic);
	}
}
